sudo rm -rf /home/deck/Downloads/homebrew.7z
cd /home/deck/Downloads/
wget "https://gitee.com/leeshan520/decky-chs/releases/download/v1.0/homebrew.7z" -O "/home/deck/Downloads/homebrew.7z" 2>&1

if [ $? -eq 0 ]; then
    echo "下载成功，继续执行下一步操作。"
else
    echo "下载失败，请检查网络或链接。"
    exit 1
fi
/usr/bin/7z x /home/deck/Downloads/homebrew.7z
sudo chmod -R 777 /home/deck/Downloads/homebrew/
sudo cp -r /home/deck/Downloads/homebrew/ /home/deck/
sudo rm -rf /home/deck/SteamDeck/decky-chs.sh
sudo rm -rf /home/deck/Downloads/homebrew.7z
sudo rm -rf /home/deck/Downloads/homebrew/

echo "脚本运行完毕，请按任意键退出..."
read -n 1